<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <title>JSP - Hello World</title>
</head>
<body>

<%--${sessionScope.users}--%>

<%--<% for (int i = 0; i < 10; i++) {--%>

<%--%>--%>
<%--<h1>Hello World JSP</h1>--%>

<%--<% } %>--%>
<a href="#">添加用户</a>
<form action="/chapter04/search">
 用户名: <input type="text" name="keyWord">
  <input type="submit" value="搜索">
</form>

<table border="1px">
  <tr>
    <td>序号</td>
    <td>姓名</td>
    <td>年龄</td>
    <td>操作</td>
  </tr>
  <c:forEach var="user" items="${sessionScope.users}">
    <tr>
      <td>${user.id}</td>
      <td>${user.userName}</td>
      <td>${user.password}</td>
      <td><a href="#">修改</a><a href="#">删除</a></td>
    </tr>
  </c:forEach>
</table>


<%--<c:forEach var="i" begin="1" end="5">--%>
<%--  <h1>Hello World JSP</h1>--%>
<%--</c:forEach>--%>

</body>
</html>